FROM registry.cn-hangzhou.aliyuncs.com/zyzbp/openjdk:11-jdk-hotspot-bionic

MAINTAINER wangx iamwx@foxmail.com

RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone

RUN mkdir -p /opt/apps /opt/dataease/data/feature/full /opt/dataease/drivers /opt/dataease/plugins/default

COPY full/ /opt/dataease/data/feature/full/
COPY zbp-bi-server.jar /app.jar
COPY zbp-bi.properties /opt/dataease/conf/dataease.properties
COPY application.properties /application.properties


HEALTHCHECK --interval=15s --timeout=5s --retries=20 --start-period=30s CMD curl -f 127.0.0.1:8081

ENTRYPOINT ["java", "-Xmx2g", "-Djava.security.egd=file:/dev/./urandom", "-Ddruid.mysql.usePingMethod=false", "-jar", "/app.jar", "--spring.config.location=/application.properties"]
